<template>
  <div class="My_mes">
    <div class="mes_left">
      <h3><i class="el-icon-message-solid"></i>消息中心</h3>
      <ul>
        <li
          v-for="(nav, i) in mesNav"
          :key="i"
          :class="i == clickNav ? 'click_nav' : ''"
          @click="cNav(i)"
        >
          {{ nav }}
        </li>
      </ul>
    </div>
    <div class="mes_right">
      <div class="mes_title">{{ mesNav[clickNav] }}</div>
      <ul class="mes_list">
        <li v-for="(list,i) in mesList" :key="i">
          <div class="mes_photo">
            <img src="../../assets/img/logo.png" alt="" />
            <span>陈小远</span>
          </div>
          <div class="mes_main">
            <p class="comment_me">
              啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦
            </p>
            <div>时间：2022年2月13日14：07 <span>回复</span><span>删除</span></div>
          </div>
          <div class="my_comment">
            <p>我回复的信息我回复的信息我回复的信息我回复的信息</p>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      mesNav: ["互动信息","评论回复", "系统通知", "老师通知", "审批通知", "队伍消息"],
      clickNav: 0,
      mesList:10
    };
  },
  name: "MyMes",
  methods: {
    cNav(num) {
      this.clickNav = num;
    },
  },
};
</script>

<style scoped>
.My_mes {
  width: 90%;
  height: 100%;
  margin: auto;
  display: flex;
  background-color: rgba(255, 255, 255, 0.2);
}
.mes_left {
  width: 200px;
  margin: 0 20px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.8);
}
.mes_left>h3{
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid #909399;
}
.mes_left ul>li{
    height: 24px;
    font: 18x/24px '';
    margin: 20px;

}
.mes_right {
  width: 75%;
  padding: 10px;
}
.mes_title {
  height: 40px;
  padding-left: 10px;
  margin-bottom: 10px;
  font: 18px/40px "";
  border-radius: 5px;
  background-color: #fff;
}
.mes_list {
    height: 91%;
  border-radius: 5px;
  margin-bottom: 10px;
  padding: 10px 20px;
  overflow-y: scroll;
  background-color: #fff;
}
.mes_list > li {
  display: flex;
  margin: 30px 0;
  justify-content: space-between;
}
.mes_main{
    width: 75%;
    color: #606266;
    padding-bottom: 30px;
    border-bottom: 1px solid #DCDFE6;
}
.mes_main>div{
    font-size: 12px;
    color: #909399;
}
.mes_main>div>span{
margin:0 10px;
padding: 3px 10px;
border-radius: 20px;
color: white;
background-color: #409eff;
}
.mes_main>div>span:last-of-type{
    background-color: #f56c6c;
}
.comment_me {
  width: 80%;
  margin-bottom: 20px;
  text-indent: 2em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.my_comment {
  width: 100px;
  height: 100%;
  font-size: 14px;
  color: #909399;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mes_photo {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mes_photo>span{
    font-weight: 700;
    color: #303133;
}
.mes_photo > img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid #409eff;
}
.mes_left > ul > li {
  cursor: pointer;
}
.click_nav {
  color: #fff;
  border-radius: 10px;
  transition: 0.3s;
  background-color: #409eff;
}
</style>
